home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / language / macberon.sit / MacOberon 2.4(0) / ToolBox.Tool (.txt) < prev    next >
Encoding:
Oberon Text  |  1991-10-17  |  2.2 KB  |  19 lines

  1. Syntax10.Scn.Fnt
  2. ParcElems
  3. Alloc
  4. Syntax10b.Scn.Fnt
  5. Syntax10i.Scn.Fnt
  6. MacOberon ToolBox Interfaces
  7. MacOberon offers a simple means for defining interfaces to the Macintosh Operating System and Toolbox.   A subset of these interfaces is already included with MacOberon and additions and further interface modules can be created easily.  Procedure definitions including a minus sign following the PROCEDURE symbol are treated as Interface Procedures; the compiler will substitute in-line the byte sequence appearing instead of a procedure body when compiling the procedure call.
  8. Data structures used by the Macintosh Operating System and Toolbox now have the same internal structure as Oberon structures.  However, pointers allocated by the Macintosh Toolbox must be invisible to the Oberon garbage collector. This is achieved by placing a minus sign after the word POINTER in the type definition. The standard procedure NEW will not work on these pointers, you must use the toolbox routine NewPtr.
  9.     Compiler.Compile
  10.         MacTypes.Mod/s    MacQuickDraw.Mod/s    MacMenus.Mod/s
  11.         MacEvents.Mod/s    MacTextEdit.Mod/s    MacWindows.Mod/s
  12.         MacDesk.Mod/s    MacDialogs.Mod/s    ~
  13. SampleApp is an Oberon module that demonstrates how MacOberon may be used for constructing applications that follow the Macintosh User Interface Guidelines.  It shows how to hide the MacOberon window, arrow and menu bar and how to return to MacOberon in an orderly fashion.  In the event of a trap, including the one induced by the Command-Shift-Option keyboard break, Oberon's menus and arrow cursor will automatically be restored.
  14.     Compiler.Compile SampleApp.Mod ~
  15.     SampleApp.Loop
  16.     (* Choose Quit from File menu to return to Oberon *)
  17. MacOberon uses resource numbers greater than 32000, while the Operating System reserves all numbers smaller than 128.  Numbers between these two values may be assigned freely to resources belonging to user commands. These resources may then be included in the MacOberon application, or alternatively may be stored in separate resource files.  SampleApp demonstrates how to access a resource file "SampleApp.r".
  18. Michael Franz, 10.10.91
  19.